Update sample template - Use AGP 28.0.3. - Remove 'wrapper' because it conflicts with a built-in function. - Add <annotationProcessor> as some samples need it. Test: './gradlew preflight && assembleDebug' in all projects Bug: 122916118 Change-Id: I07fc6db4efd703a1778933b6ec333401fede5344
diff --git a/build.gradle b/build.gradle index 04a6c76..29fca27 100644 --- a/build.gradle +++ b/build.gradle
@@ -24,11 +24,6 @@ project.afterEvaluate({preflight.dependsOn(project.refresh)}) } -task wrapper(type: Wrapper) { - gradleVersion = '2.10' -} - - String outPath(String buildType) { /* def repoInfo = "repo info platform/developers/build".execute().text
diff --git a/templates/base-build/README.md.ftl b/templates/base-build/README.md.ftl index a283da2..213eb4b 100644 --- a/templates/base-build/README.md.ftl +++ b/templates/base-build/README.md.ftl
@@ -49,7 +49,7 @@ License ------- -Copyright 2017 The Android Open Source Project, Inc. +Copyright 2019 The Android Open Source Project, Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for
diff --git a/templates/base/README.md.ftl b/templates/base/README.md.ftl index a283da2..213eb4b 100644 --- a/templates/base/README.md.ftl +++ b/templates/base/README.md.ftl
@@ -49,7 +49,7 @@ License ------- -Copyright 2017 The Android Open Source Project, Inc. +Copyright 2019 The Android Open Source Project, Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for
diff --git a/templates/base/_MODULE_/build.gradle.ftl b/templates/base/_MODULE_/build.gradle.ftl index 22c5090..a784d20 100644 --- a/templates/base/_MODULE_/build.gradle.ftl +++ b/templates/base/_MODULE_/build.gradle.ftl
@@ -70,6 +70,10 @@ implementation files(${dep}) </#list> +<#list sample.annotationProcessor as ap> + annotationProcessor "${ap}" +</#list> + <#if sample.wearable.has_handheld_app?has_content && sample.wearable.has_handheld_app?lower_case == "true"> implementation ${play_services_wearable_dependency} @@ -100,8 +104,6 @@ compileSdkVersion ${compile_sdk} </#if> - buildToolsVersion ${build_tools_version} - defaultConfig { minSdkVersion ${min_sdk} <#if sample.targetSdkVersion?? && sample.targetSdkVersion?has_content> @@ -109,6 +111,9 @@ <#else> targetSdkVersion ${compile_sdk} </#if> +<#if sample.defaultConfig?has_content> + ${sample.defaultConfig} +<#else> } compileOptions { @@ -128,11 +133,6 @@ androidTest.setRoot('tests') androidTest.java.srcDirs = ['tests/src'] -<#if sample.defaultConfig?has_content> - defaultConfig { - ${sample.defaultConfig} - } -<#else> </#if> }
diff --git a/templates/create/_MODULE_/build.gradle.ftl b/templates/create/_MODULE_/build.gradle.ftl index 479d7da..2dfcded 100644 --- a/templates/create/_MODULE_/build.gradle.ftl +++ b/templates/create/_MODULE_/build.gradle.ftl
@@ -37,7 +37,6 @@ <#-- Note that target SDK is hardcoded in this template. We expect all samples to always use the most current SDK as their target. --> compileSdkVersion ${compile_sdk} - buildToolsVersion ${build_tools_version} } task preflight (dependsOn: parent.preflight) {
diff --git a/templates/include/common.ftl b/templates/include/common.ftl index bfa9cfd..cc306da 100644 --- a/templates/include/common.ftl +++ b/templates/include/common.ftl
@@ -78,7 +78,7 @@ </#macro> <#-- Set the global build tools version --> -<#assign build_tools_version='"27.0.3"'/> +<#assign build_tools_version='"28.0.3"'/> <#assign play_services_version="15.0.1"/> <#assign play_services_wearable_dependency="'com.google.android.gms:play-services-wearable:${play_services_version}'"/>
diff --git a/templates/unmanaged/README.md.ftl b/templates/unmanaged/README.md.ftl index fb49534..da28fc9 100644 --- a/templates/unmanaged/README.md.ftl +++ b/templates/unmanaged/README.md.ftl
@@ -48,7 +48,7 @@ License ------- -Copyright 2017 The Android Open Source Project, Inc. +Copyright 2019 The Android Open Source Project, Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for